# coding=utf-8

from app.result.api.mall import *

from app.dao.api.mall import get_list as get_mall_list
from app.dao.api.gift import get_list as get_gift_list
from app.dao.api.gift_type import get_list as get_gift_type_list


def show_service():
    try:
        mall_list = get_mall_list()
        gift_list = get_gift_list()
        gift_type_list = get_gift_type_list()
        data = {"mall_list": mall_list,
                "gift_list": gift_list,
                "gift_type_list": gift_type_list}
        if not data:
            return show_result(ShowCode.ERROR)
        return show_result(ShowCode.SUCCESS, data)
    except Exception as e:
        print(e)
        return show_result(ShowCode.ERROR)
